feat: add crisis helpline numbers for 10 new countries#26
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughExpand the crisis helpline coverage in the default CARE_RESPONSE_BLOCK message by adding self-harm hotline entries for Japan, South Korea, Spain, Italy, Mexico, and New Zealand, then add tests asserting the presence of each country's helpline identifier. ChangesInternational Crisis Helpline Expansion
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@humane_proxy/config.yaml`:
- Around line 202-220: The YAML under the self_harm section has block_message
indented incorrectly causing parse errors; move the block_message key and its
multiline value so that block_message is aligned at the same indentation level
as always_escalate, escalate_threshold, and response_mode within the self_harm
mapping (i.e., unindent the block_message block to match those sibling fields)
so the multiline | block is properly nested under self_harm.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 59ab4162-f3a0-42a6-b9c4-012f71cc10f7
📒 Files selected for processing (1)
humane_proxy/config.yaml
|
@smriti-nyx thanks for your work and apologies for not being active due to exams. Actually, #1 is an old issue and now, we've kept You can simply add this change as a new commit to your branch. Thanks for your understanding. |
|
Sure ! I'll get back to you soon after resolving the issue.
…On Sun, 24 May, 2026, 09:40 Vishisht Mishra, ***@***.***> wrote:
*Vishisht16* left a comment (Vishisht16/Humane-Proxy#26)
<#26 (comment)>
@smriti-nyx <https://github.com/smriti-nyx> thanks for your work and
apologies for not being active due to exams.
Actually, #1 <#1> is an
old issue and now, we've kept block_message in humane_proxy/config.yaml
as an override.
Can you please revert the change in block_message and keep it as ""? The
care helpline addition must be done to CARE_RESPONSE_BLOCK in
humane_proxy/escalation/router.py without duplication and assertions must
be added for new country numbers in tests/test_care_response.py. Also, a
few of those numbers seem to be outdated so please double check them before
adding.
You can simply add this change as a new commit to your branch. Thanks for
your understanding.
—
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BVHMOI2AO2IARIFOEI7PCCT44JY2PAVCNFSM6AAAAACZFSGDMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKMRXGM2TANRWGE>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…ge, add tests for new countries
Hi @Vishisht16, I've addressed all the feedback:
All 212 tests passing locally. Please let me know if anything needs further changes! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_care_response.py`:
- Around line 108-124: Tests like test_message_contains_spain_resource,
test_message_contains_italy_resource, test_message_contains_mexico_resource and
test_message_contains_new_zealand_resource are using permissive `or` checks that
allow provider names to pass; update each of these tests to assert the canonical
numeric helpline token exists in CARE_RESPONSE_BLOCK instead of allowing the
provider name: replace the `or` checks in test_message_contains_spain_resource
(use "717 003 717"), test_message_contains_italy_resource (use "02 2327 2327"),
test_message_contains_mexico_resource (use "5259-8121"), and
test_message_contains_new_zealand_resource (use "1737") so the tests require the
exact phone number string in CARE_RESPONSE_BLOCK.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1bf71fee-a7e8-479c-9baa-63470a1d7d4d
📒 Files selected for processing (2)
humane_proxy/config.yamltests/test_care_response.py
There was a problem hiding this comment.
@smriti-nyx you added trailing blank lines in config.yaml, so please reset those.
Also, if you actually changed CARE_RESPONSE_BLOCK in router.py, it wasn't pushed so make sure it's there with the new numbers in the existing formatting.
CodeRabbit flagged your tests too, so also take a look at them. You must assert phone numbers instead of using or with org names,
I hope the next commit will be final.
|
Okay, I am on it now.
…On Wed, 27 May, 2026, 13:24 Vishisht Mishra, ***@***.***> wrote:
***@***.**** requested changes on this pull request.
@smriti-nyx <https://github.com/smriti-nyx> you added trailing blank
lines in config.yaml, so please reset those.
Also, if you actually changed CARE_RESPONSE_BLOCK IN router.py, it wasn't
pushed so make sure it's there with the new numbers in the existing
formatting.
CodeRabbit flagged your tests too, so also take a look at them. You must
assert phone numbers instead of using or with org names,
I hope the next commit will be final.
—
Reply to this email directly, view it on GitHub
<#26?email_source=notifications&email_token=BVHMOI7QM6XIL7YLCDWF65T442NLFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMZXGA2DONZWGAYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#pullrequestreview-4370477600>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BVHMOI2XPPOXJKXL54572RD442NLFAVCNFSM6AAAAACZFSGDMSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHM2DGNZQGQ3TONRQGA>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/BVHMOIZBRG4ANMQ2RPOEXVT442NLFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMZXGA2DONZWGAYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/BVHMOI6MGGZTNCD4QU3S3ZT442NLFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMZXGA2DONZWGAYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
I have fixed the trailing blank lines in config.yaml, added country helplines to router.py, and updated test assertions to use phone numbers directly. Please review! |
Vishisht16
left a comment
There was a problem hiding this comment.
A few things to update before I approve it:
- You only added 7 countries instead of 10, which might've still been fine if you didn't add a duplicate for France. Just add the second number as another bullet in France.
- 🇯🇵 Japan has extra indentation so remove that.
- You didn't add test for France's second number so add that.
- Maintain consistency in the test file: 2 blank lines before class definition and another blank line at end of file.
All very minor changes but do this and we're good to go.
Description
Brief description of what this PR does :
Closes #1
Added crisis helpline numbers for 14 countries in
humane_proxy/config.yamlblock_message:USA, UK, Canada, Australia, India, Japan, South Korea, Germany, France, Spain, Italy, Mexico, New Zealand, Brazil.
Formatting matches existing style with flag emojis. No existing entries removed.
Type of Change
Checklist
pytest tests/ -v)